CREATE TABLE [dbo].[TDCOMP_PAGO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_COMP_PAGO] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_PAGO] [dbo].[TD_VC_008] NOT NULL,
[NU_CUOT_DETA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_PA__NU_CU__1446FBA6] DEFAULT ((0)),
[FE_VENC_CUOT] [dbo].[TD_DT_001] NOT NULL,
[IM_CUOT] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_PA__IM_CU__153B1FDF] DEFAULT ((0)),
[IM_PAGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_PA__IM_PA__162F4418] DEFAULT ((0)),
[ST_CONT] [dbo].[TD_VC_001_INTE] NOT NULL CONSTRAINT [DF__TDCOMP_PA__ST_CO__17236851] DEFAULT ('N'),
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDCOMP_PA__NU_PR__190BB0C3] DEFAULT ((0)),
[IM_APLI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCOMP_PA__IM_AP__19FFD4FC] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_PA__CO_US__1AF3F935] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_PA__FE_US__1BE81D6E] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_PA__CO_US__1CDC41A7] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_PA__FE_US__1DD065E0] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_PAGO] WITH NOCHECK ADD CONSTRAINT [CK__TDCOMP_PA__ST_CO__18178C8A] CHECK NOT FOR REPLICATION (([ST_CONT]='P' OR [ST_CONT]='N'))
GO
ALTER TABLE [dbo].[TDCOMP_PAGO] ADD CONSTRAINT [PK__TDCOMP_P__F807E9FE212CC0CF] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_PAGO] ADD CONSTRAINT [FK__TDCOMP_PAGO__39E36000] FOREIGN KEY ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO]) REFERENCES [dbo].[TCCOMP_PAGO] ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO])
GO
